import CodeMirrorWrapper from '@/components/CodeMirrorWrapper';
import { Grid } from '@mui/material';
import { memo } from 'react';

/**
 * JSON编辑器区域组件
 */
const EditorSection = memo(({ 
    jsonContent, 
    setJsonContent 
}: { 
    jsonContent: string; 
    setJsonContent: (value: string) => void; 
}) => (
    <Grid item xs={12}>
        <CodeMirrorWrapper
            label="JSON 内容"
            value={jsonContent}
            onChange={setJsonContent}
            height="300px"
            language="json"
            placeholder="在此输入JSON内容..."
        />
    </Grid>
));

export default EditorSection;